<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$school['title']}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/kqtjCss.css?v=5.1"/>
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/greenStyle.css?v=4.80120" />
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
{php include $this->template('port');}
<div id="BlackBg" class="BlackBg"></div>
<div id="titlebar" class="header mainColor">
	<div class="l"><a class="backOff" style="background:url({OSSURL}public/mobile/img/ic_arrow_left_48px_white.svg) no-repeat;background-size: 55% 55%;background-position: 50%;" href="javascript:history.go(-1);"></a></div>
	<div class="m">
		<a id="showbjlist">
			<span style="font-size: 18px">{$bjidname['sname']}</span>
			<i></i>
		</a>
	</div>
	<div class="r">
		<a id="showhistory">历史记录</a>
	</div>
</div>
<div id="titlebar_bg" class="_header"></div>

</head>
<body id="kqtjbody">
	<div id="attendance">
		<div class="r1">
			<div class="t">
				<div class="t1">全班学生</div>
				<div id="num1">{$snum}人</div>
			</div>
		</div>
		<div class="m1">
			<div class="t">
				<div class="t2">今日打卡次数</div>
				<div id="num2">{$rlogmub}</div>
			</div>
		</div>
		<div class="l1">
			<a id="gopage" href="#">
				<div class="t">
					<div class="t3">日期</div>
					<div id="num3">{php echo date('m月d日',$starttime)}</div>
				</div>
			</a>
		</div>
	</div>
	<ul id="table-responsive">	
		<li class="thead">
			<ul>
				<li class="li1">学生</li>
				<li class="li2">考勤</li>
				<li class="li3">进校</li>
				<li class="li4">离校</li>
				<li class="li5">异常</li>
			</ul>
		</li>                                                                                                									
		<li class="tbody">
		{loop $student $item}
			{if $item['id']%2 == 0}
			<li class="li" style="background-color: rgb(244, 244, 244);">
			{else}
			<li class="li" style="background-color: white;">
			{/if}
				<ul>
					<li class="li1">{$item['s_name']}</li>
					<li class="li2" style="{if !empty($item['ischeck'])}background-color:red;{/if}"><span>{if !empty($item['ischeck'])}已打卡{else}未打卡{/if}</span></li>
					<li class="li3">{$item['jxnum']}次</li>
					<li class="li4">{$item['lxnum']}次</li>
					<li class="li5" style="{if $item['ycnum']!=0}background-color:red;{/if}">{$item['ycnum']}次</li>
					
				</ul>		
			</li>
		{/loop}
		<li class="tfoot"></li>
		<li class="overDiv"></li>
	</ul>
	<div class="selectList" id="selectList" style="z-index:100000;display:none;">
		<div class="single" style="z-index:100000;border-radius: 5%;">
			<ul>
				<span style="color:#444;">切换班级</span>
			{loop $bjlist $row}
				<li onclick="isSelect({$row['sid']});"><span class="ri">{$row['sname']}</span></li>
			{/loop}
			</ul>
		</div>
	</div>
	<div class="user_info" id="user_info" style="display:none;">
	   <div>
			<ul>
				<p>查看历史记录</p>				
				<li class="user_name">
				  选择日期
					<input type="date" name ="time" id="time" value="">
				  
				</li>						
				<div class="btn" id="bdax">提交</div>
			</ul>
			<span id="clos">×</span>
	   </div>
    </div>	
<script type="text/javascript">
	$(function ($) {
		$("#showbjlist").on('click', function () {
            $('#selectList').show();
		});
		$("#showhistory").on('click', function () {
            $('#user_info').show();
		});		
		$("#bdax").on('click', function () {
			var time = $("#time").val();
			if (time == "" || time == undefined || time == null) {
            jTips('请选择日期！');
            return false;
			}
			location.href = "{php echo $this->createMobileUrl('tchecklog', array('schoolid' => $schoolid,'bj_id' => $bj_id), true)}"+ '&time=' + time;	
		});		
	});
	function isSelect(bjid){
		jTips("数据加载中！···");
		location.href = "{php echo $this->createMobileUrl('tchecklog', array('schoolid' => $schoolid), true)}"+ '&bj_id=' + bjid;
	}	
</script>
{php include $this->template('newfooter');}	
</body>
</html>